package com.putong35.common.app.data;

import java.util.ArrayList;
import java.util.List;

public class UrlConfig {
    public static final String URL_PREFIX = "http://47.112.147.136";

    public static class Param {
        public static final String IMSI = "imsi";
        public static final String IMEI = "imei";
        public static final String USERID = "user_id";
        public static final String TOKEN = "token";
        public static final String AREAID = "area_id";
        public static final String LONG = "long";
        public static final String LAT = "lat";
        public static final String SERVER_API_VERSION = "ver";
        public static final String CHANNEL_ID = "ch";
        public static final String PAGE = "pageNo";
        public static final String PAGE_SIZE = "pageSize";
    }

    public static final String IMAGE_PREFIX = "http://47.112.147.136";

    public static final String makeImageUrl(String srcUrl) {
        return IMAGE_PREFIX + srcUrl;
    }

    public static final List<String> makeImageUrl(List<String> srcUrls) {
        List<String> retUrls = new ArrayList<>();
        if (srcUrls != null && srcUrls.size() > 0) {
            for (int i = 0; i < srcUrls.size(); i++) {
                retUrls.add(makeImageUrl(srcUrls.get(i)));
            }
        }
        return retUrls;
    }

}
